using System;

namespace NRehersal
{
    internal class TestExpectationState : ITestInvocation
    {
        private readonly TestData data;

        public TestExpectationState(TestData data)
        {
            this.data = data;
        }

        public ITestInvocation ExpectException<T>()
        {
            data.ExpectedException = typeof(T);
            return this;
        }


        public ITestInvocation Execute(Action code)
        {
            data.Code = code;
            return this;
        }

        public TestData Data
        {
            get { return data;}
        }
    }
}